package sk.stuba.fiit.ltasys.web.mvc.model.service;

import java.io.File;
import java.io.IOException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.PrivateKey;
import java.security.SignatureException;
import java.security.cert.X509Certificate;
import java.util.List;

public interface CryptographyService {

	public byte[] calculateSignatureFromHashData(String algorithm,PrivateKey privateKey,List<Object>data) throws NoSuchAlgorithmException, NoSuchProviderException, InvalidKeyException, SignatureException;
	public boolean verifieSignature(String algorithm, X509Certificate certificate,List<Object>data, byte[] signatureValue) throws NoSuchAlgorithmException, InvalidKeyException, SignatureException;
	public byte[] calculateHash(byte[] data,String algorithm) throws NoSuchAlgorithmException;
	public byte[] readFile(File file) throws IOException;
}
